import java.awt.image.BufferedImage;
import java.io.FileInputStream;
import java.io.IOException;

import javax.imageio.ImageIO;

public class ImageSize {
	public int width;
	public int height;

	public ImageSize(int width, int height) {
		this.width = width;
		this.height = height;
	}
	
	public ImageSize(String path) {
		FileInputStream fis = null;
		BufferedImage bufferedImg = null;
		try {
			fis = new FileInputStream(path);
			bufferedImg = ImageIO.read(fis);
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			try {
				fis.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		this.width = bufferedImg.getWidth();
		this.height = bufferedImg.getHeight();
	}
	
}